<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('quotations', function (Blueprint $table) {
            $table->id();
            $table->integer('person_id')->comment('用户ID');
            $table->string('name')->nullable()->comment('项目名称');
            $table->string('address')->nullable()->comment('项目地址');
            $table->string('industry')->nullable()->comment('所属行业');
            $table->string('contact')->nullable()->comment('联系人');
            $table->string('phone')->nullable()->comment('联系电话');
            $table->string('contact_business')->nullable()->comment('业务联系人');
            $table->string('phone_business')->nullable()->comment('业务联系电话');
            $table->string('material')->nullable()->comment('材料');
            $table->string('pressure')->nullable()->comment('压力');
            $table->string('brand')->nullable()->comment('品牌');
            $table->json('kongyaji')->nullable()->comment('空压机');
            $table->json('chuqiguan')->nullable()->comment('储气罐');
            $table->json('lengganji')->nullable()->comment('冷干机');
            $table->json('ganzaoji')->nullable()->comment('干燥机');
            $table->json('golvqi')->nullable()->comment('过滤器');
            $table->json('zengyaji')->nullable()->comment('增压机');
            $table->json('qita')->nullable()->comment('其他');
            $table->tinyInteger('range')->nullable()->comment('报价范围');
            $table->string('remark')->nullable()->comment('备注');
            $table->text('images')->nullable()->comment('图片');
            $table->text('videos')->nullable()->comment('视频');
            $table->text('note')->nullable()->comment('备注');
            $table->tinyInteger('status')->default(0)->comment('状态：0未联系 1已联系');
            $table->string('industry_reason')->nullable()->comment('所属行业-其他');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('quotations');
    }
};
